import { moduleRequest } from "./axios";

const GET_URL = "detail";
const ADD_URL = "add";
const EDIT_URL = "edit";
const DELETE_URL = "delete";

const request = moduleRequest(`/biz/setting/`);
export default {
  get() {
    return request(GET_URL, undefined, "get");
  },
  add(data) {
    return request(ADD_URL, data, "post");
  },
  edit(data) {
    return request(EDIT_URL, data, "post");
  },
  delete(data) {
    return request(DELETE_URL, data, "post");
  },
};

export interface UserInfo {
  avatar?: string;
  account?: string;
}

export interface Setting {
  backgroundPicture?: string | null;
  avatar?: string | null;
  theSidebar?: string | null;
  theSidebarPosition?: string | null;
}
